import React, { useEffect } from "react";
import styles from "./index.module.scss";
import { wxShareInit } from "./shareJs";

function A6WxShare() {
  useEffect(() => {
    try {
      wxShareInit();
      // token 有效期为 7200s
      window.setInterval(() => {
        wxShareInit();
      }, 719000);
    } catch (error) {
      console.error(error);
    }
  }, []);

  return (
    <div className={styles.A6WxShare}>
      <h1>A6WxShare</h1>
    </div>
  );
}

const MemoA6WxShare = React.memo(A6WxShare);

export default MemoA6WxShare;
